package com.sh;

import com.sh.bean.UserEntity;
import com.sh.dto.UserDTO;
import com.sh.transfer.UserTransfer;

/**
 * @Auther: sh
 * @Version 1.0
 * @Description:
 */
public class Main {
    public static void main(String[] args) {
        UserEntity entity = new UserEntity();
        entity.setId(1L);
        entity.setName("Alice");
        entity.setEmail("alice@example.com");
        entity.setNameA("shihao");

        UserDTO dto = UserTransfer.INSTANCE.entityToDto(entity);

        System.out.println(dto);  // 输出：Alice

        UserEntity userEntity = UserTransfer.INSTANCE.dtoToEntity(dto);
        System.out.println(userEntity);


    }
}

